﻿<!-- "script/apps/Aries/Creator/Game/Areas/ServerLogin.html" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <pe:mcml>
<script refresh="false" type="text/npl" src="ServerPage.lua"><![CDATA[
NPL.load("(gl)script/apps/Aries/Creator/Game/Areas/ServerPage.lua");
ServerPage = commonlib.gettable("MyCompany.Aries.Creator.Game.Desktop.ServerPage")

function ClosePage()
    Page:CloseWindow();
end

function OnOK()
    local username = Page:GetValue("username", "");
    local password = Page:GetValue("password", "");
    if(username == "" or password == "") then
        _guihelper.MessageBox(L"用户名或密码不能为空");
        return;
    end
    ServerPage.UserLogin(username,password)
    ClosePage();
end

function GetName()
    return ServerPage.server_info.name or L"默认";
end

function GetCreator()
    return ServerPage.server_info.creator or L"默认";
end

function GetIP()
    return ServerPage.server_info.ip or L"默认";
end

function GetDetail()
    return ServerPage.server_info.detail or L"默认";
end


]]></script>
<aries:window mode="thin" style="width:400px;height:300px;" title='<%=L"服务器登录"%>' onclose="ClosePage">
    <div style="margin-left:15px;margin-top:10px;width:360px;" class="mc_border">
        <div style="margin-left:50px;margin-top:10px;">
            <div style="float:left;color:#ffffff;">
                <%=L"服务器名称:"%>
            </div>
            <div style="float:left;color:#ffffff;height:24px;">
                <%= GetName() %>
            </div>
        </div>
        <div style="margin-left:80px;margin-top:1px;">
            <div style="float:left;color:#ffffff;">
                <%=L"创建人:"%>
            </div>
            <div style="float:left;color:#ffffff;height:24px;">
                <%= GetCreator() %>
            </div>
        </div>
    
        <div style="margin-left:50px;margin-top:1px;">
            <div style="float:left;color:#ffffff;margin-top:5px;">
                <%=L"服务器地址:"%>
            </div>
            <div style="float:left;color:#ffffff;margin-top:5px;">
                <%=GetIP()%>
            </div>
        </div>
    
        <div style="margin-left:50px;margin-top:1px;height:100px;">
            <div style="float:left;color:#ffffff;margin-top:5px;">
                <%=L"服务器介绍:"%>
            </div>
            <div style="float:left;color:#ffffff;margin-top:5px;">
                <%=GetDetail()%>
            </div>
        </div>  
    </div>
    
    
    <div>
        <div style="float:left; margin-left: 27px; margin-top: 10px; color: #ffffff; ">
            <%=L"用户名"%>
        </div>
        <div style="float:left;margin-left:10px;margin-top:10px;">
            <input type="text" name="username" autofocus="true" value="" rows="1" style="margin-top:0px;margin-left:0px;width:100px;height:24px;" class="mc_text"/>
        </div>
        <div style="float:left; margin-left: 20px; margin-top: 10px; color: #ffffff; ">
            <%=L"密码"%>
        </div>
        <div style="float:left;margin-left:10px;margin-top:10px;">
            <input type="text" name="password" value="" rows="1" style="margin-top:0px;margin-left:0px;width:100px;height:24px;" class="mc_text"/>
        </div>
    </div>
    <div style="height:50px;">
        <input type="button" value='<%=L"登录"%>' onclick="OnOK" style="margin-top: 10px; margin-left: 150px; width: 60px; height: 22px; color: #ffffff;" class="mc_light_grey_button_with_fillet" />
    </div>
    
</aries:window>
</pe:mcml>
</body>
</html>

